package org.bluedream.core.module.base;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.bluedream.core.module.entity.bill.stkIn.dtl.StkInBackDtl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;


/**
 * @ClassName BillDtlServiceImpl
 * @Description TODO
 * @Author Administrator
 * @Data 2022/7/4 10:43
 * @Version
 */
@Transactional(
        readOnly = true
)
public class BillDtlServiceImpl<M extends BaseMapper<T>, T> extends OrgBaseServiceImpl<M , T> {
    protected Logger logger = LoggerFactory.getLogger(this.getClass());

    public List<T> listByHead(String billNum , String billType , String orgCode , T entity){
        QueryWrapper<T> dtlQueryWrapper = new QueryWrapper<>();
        dtlQueryWrapper.eq("bill_num" , billNum);
        dtlQueryWrapper.eq("bill_type" , billType);
        dtlQueryWrapper.eq("org_code" , orgCode);
        return super.list(dtlQueryWrapper);
    }
}